import { Equal } from "@type-challenges/utils";

export type Chainable<T = {}> = {
  option<K extends string, P>(
    key: K extends keyof T ? (Equal<P, T[K]> extends true ? never : K) : K,
    value: P
  ): Chainable<Omit<T, K> & Record<K, P>>;
  get(): T;
};
